#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <QSettings>

#include "resfile.h"
#include "downloadtool.h"
#include "logger.h"
#include "mydirtools.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actiondownTest_triggered();

    void on_actiontest1_triggered();

    void on_actionexe_triggered();

    void on_actiondirTest_triggered();

    void on_actionloadDir_triggered();

private:
    QString formatSpeedBps(qint64 bps);
    QString formatReadCountBps(qint64 bytesReadCount,qint64 totalBytesCount);

    void Done();
    void initIni(QString key,QString value);

private:
    Ui::MainWindow *ui;

    QTimer timer;

    ResFileMgr resFileMgr;
    DownloadToolMgr downMgr;


//    QSettings config{".set.ini",QSettings::IniFormat};


};
#endif // MAINWINDOW_H
